package univer.oko.utilities;

import javax.swing.*;

/**
 * User: core
 * DATE: 03.03.2005
 * Time: 0:23:47
 */
final class StringVerifier extends InputVerifier {
    public boolean verify(JComponent c) {
        JTextField tf = (JTextField) c;
        String text = tf.getText();
        for (int i = 0; i < text.length(); i++) {
            char ch = text.charAt(i);
            if (!Character.isLetter(ch) && ch != ' ' && ch != '(' && ch != ')') {
                return false;
            }
        }
        return true;
    }
}
